#ifndef WPSPROCESSDOCK_H
#define WPSPROCESSDOCK_H
#include <QWidget>
#include <QVBoxLayout>
#include <QCheckBox>
#include <QGridLayout>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QScrollArea>
#include <unordered_map>
#include <iostream>
#include <string>
#include <cmath>
#include <QIntValidator>
#include "common/MDockAncestor.h"
#include "common/common.h"


class MainWindow;

class WPSProcessDock : public MDockAncestor
{
    Q_OBJECT

public:
    WPSProcessDock(MainWindow* aParent);
    ~WPSProcessDock() = default;
private:
    void retranslateUi();
    void showEvent(QShowEvent *anEvent) override;
    void hideEvent(QHideEvent *anEvent) override;

private:
    MainWindow  *main_window_;
    QWidget *wps_edit_widget_;
    QVBoxLayout *vbox_layout_;
    QGridLayout *button_layout_;
    QLabel *seq_num_label_;
    QLabel *lon_label_;
    QLabel *lat_label_;
    QLabel *speed_limit_label_;
    QLabel *road_type_label_;
    QLabel *left_boundary_label_;
    QLabel *right_boundary_label_;

    QLineEdit *seq_num_line_text_;
    QLineEdit *lon_line_text_;
    QLineEdit *lat_line_text_;
    QLineEdit *speed_limit_line_text_;
    QLineEdit *road_type_line_text_;
    QLineEdit *left_boundary_line_text_;
    QLineEdit *right_boundary_line_text_;
    SetofMapInfo set_of_map_info_;
    STRoadPoint modify_point_;

public slots:
    void CheckBoxChecked(int state);
    void OnStartRecordButtonClicked();
    void OnStopRecordButtonClicked();
    void OnDisplayWPSPointInfoTriggered(const STRoadPoint &point,SetofMapInfo &set_of_map_info);
    void OnEditLineTriggered();

signals:
    void EmitEditWPSPointSignal(const STRoadPoint &point,SetofMapInfo &set_of_map_info);
};

#endif
